<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑器</title>
    <link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.min.css"/>
    <script src="common/browser-polyfill.js"></script>
    <script src="jquery/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="jsoneditor/jsoneditor.min.js"></script>
    <script src="js/JMX.js"></script>
    <script src="js/editor.js"></script>
    <style>
        body {
            margin: 0;
        }

        .header {
            width: 100%;
            height: 40px;
            padding: 0 10px;
            background-color: rgb(44, 42, 72);
            color: rgb(245, 245, 245);
            font-size: 14px;
        }

        .logo {
            width: 40px;
            height: 40px;
            background-size: 40px 40px;
            background-image: url("icon/favicon-w.png");
            float: left;
        }

        .control {
            position: relative;
            display: inline-block;
            height: 40px;
            line-height: 40px;
            width: calc(100% - 60px);
        }

        .control .left {
        }

        .control .status {
            margin-left: 10px;
            min-width: 300px;
        }

        .control .right {
            float: right;
            margin-left: 10px;
            line-height: 40px;
        }

        .control #name {
            font-size: 14px;
            height: 20px;
            width: 300px;
            border: 1px solid #EFEFEF;
            border-radius: 2px;
            padding: 2px;
            outline: none;
        }

        #json-editor .jsoneditor input[type=text] {
            line-height: 20px;
        }

        .button {
            display: inline-block;
            line-height: 1;
            white-space: nowrap;
            cursor: pointer;
            background: #fff;
            border: 1px solid #dcdfe6;
            color: #606266;
            -webkit-appearance: none;
            text-align: center;
            box-sizing: border-box;
            outline: none;
            margin: 0;
            transition: .1s;
            font-weight: 500;
            -moz-user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            padding: 6px 10px;
            border-radius: 4px;
        }

        .button:hover {
            color: #409eff;
            border-color: #c6e2ff;
            background-color: #ecf5ff;
        }

        .row {
            display: flex;
            flex-direction: row;
            justify-content: center;
        }

        .col {
            display: flex;
            flex-direction: column;
        }

        #domains {
            margin: 10px auto;
            font-size: 14px;
        }

        #submit, #cancel {
            padding: 12px 20px;
            margin: 10px;
        }

        .primary {
            color: #409eff;
            background: #ecf5ff;
            border-color: #b3d8ff;
        }

        .primary:hover {
            background: #409eff;
            border-color: #409eff;
            color: #fff;
        }

    </style>
</head>
<body>
<div class="header">
    <a class="logo"></a>
    <div class="control">
        <span class="left">编辑器</span>
        <span class="status"></span>
        <div class="right">
            <label for="name">文件名:</label>
            <input id="name" type="text" name="name"/>
            <button id="export-jmx" class="button">导出JMX</button>
            <button id="export-json" class="button">导出JSON</button>
        </div>
    </div>
</div>
<div id="json-editor"></div>
<div id="domains-select" class="col" style="display: none">
    <div class="col" id="domains">

    </div>
    <div class="row">
        <button id="cancel" class="button">取消</button>
        <button id="submit" class="button primary">导出</button>
    </div>
</div>
</body>
</html>
